/**
 * Bakalarska prace - Inteligentni budik
 * @package sleepCatcher
 * @file FormSettings.h
 * @author Jan Pesava - xpesav00
 * @email xpesav00@stud.fit.vutbr.cz
 * @date 24. 12. 2011
 */

#ifndef FORMSETTINGS_H_
#define FORMSETTINGS_H_

#include <FBase.h>
#include <FUi.h>

using namespace Osp::Base;
using namespace Osp::Ui::Controls;


class FormSettings :
	public Osp::Ui::Controls::Form,
	public Osp::Ui::IActionEventListener,
	public Osp::Ui::ITouchEventListener
{

// Construction
public:
		FormSettings();
	virtual ~FormSettings();

// Constants
	static const int IDA_SETTINGS_SAVE	= 200;
// Attributes
	ScrollPanel* pSettingScrollPanel;
	EditField* pLanguageEF;
	EditField* pMaxAwakeTimeEF;
	EditField* pSleepTimeEF;
// Methods
public:
	bool Initialize(void);
	virtual result OnInitializing(void);
	virtual result OnTerminating(void);
	virtual void OnActionPerformed(const Osp::Ui::Control& source, int actionId);
	virtual void OnTouchDoublePressed (const Osp::Ui::Control &source, const Osp::Graphics::Point &currentPosition, const Osp::Ui::TouchEventInfo &touchInfo);
	virtual void OnTouchFocusIn (const Osp::Ui::Control &source, const Osp::Graphics::Point &currentPosition, const Osp::Ui::TouchEventInfo &touchInfo);
	virtual void OnTouchFocusOut (const Osp::Ui::Control &source, const Osp::Graphics::Point &currentPosition, const Osp::Ui::TouchEventInfo &touchInfo);
	virtual void OnTouchLongPressed (const Osp::Ui::Control &source, const Osp::Graphics::Point &currentPosition, const Osp::Ui::TouchEventInfo &touchInfo);
	virtual void OnTouchMoved (const Osp::Ui::Control &source, const Osp::Graphics::Point &currentPosition, const Osp::Ui::TouchEventInfo &touchInfo);
	virtual void OnTouchPressed (const Osp::Ui::Control &source, const Osp::Graphics::Point &currentPosition, const Osp::Ui::TouchEventInfo &touchInfo);
	virtual void OnTouchReleased (const Osp::Ui::Control &source, const Osp::Graphics::Point &currentPosition, const Osp::Ui::TouchEventInfo &touchInfo);
	int GetFormId();
	void SaveSettings();
	void Update();
	void Redraw();
};

#endif /* FORMSETTINGS_H_ */
